home *** CD-ROM | disk | FTP | other *** search
- Files /GNU/regex.h and regex.h are identical
- Files /GNU/limits.h and limits.h are identical
- Files /GNU/getopt.h and getopt.h are identical
- *** /GNU/diff.h Fri Apr 13 07:08:00 1984
- --- diff.h Fri Apr 13 07:33:00 1984
- ***************
- *** 22,27 ****
- --- 22,42 ----
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- + #include "regex.h"
- +
- + #ifdef AMIGA
- + #include <time.h>
- + #include <sys/dir.h>
- + #include <fcntl.h>
- + #define HAVE_NDIR
- +
- + #define bcopy(s,d,n) memcpy((d),(s),(n))
- + #define bcmp(s1,s2,n) memcmp((s1),(s2),(n))
- + #define bzero(s,n) memset((s),0,(n))
- +
- + #define index strchr
- + #define rindex strrchr
- + #endif
-
- #ifdef USG
- #include <time.h>
- ***************
- *** 39,48 ****
- --- 54,65 ----
- #define direct dirent
- #endif
- #else /* not USG */
- + #ifndef AMIGA
- #include <sys/time.h>
- #include <sys/dir.h>
- #include <sys/file.h>
- #endif
- + #endif
-
- #ifdef USG
- /* Define needed BSD functions in terms of sysV library. */
- ***************
- *** 74,81 ****
- --- 91,100 ----
- #define FALSE (0)
- #define TRUE 1
-
- + #ifndef AMIGA
- #define min(a,b) ((a) <= (b) ? (a) : (b))
- #define max(a,b) ((a) >= (b) ? (a) : (b))
- + #endif
-
- #ifndef PR_FILE_NAME
- #define PR_FILE_NAME "/bin/pr"
- ***************
- *** 318,324 ****
-
- /* Describe the two files currently being compared. */
-
- ! struct file_data files[2];
-
- /* Queue up one-line messages to be printed at the end,
- when -l is specified. Each message is recorded with a `struct msg'. */
- --- 337,343 ----
-
- /* Describe the two files currently being compared. */
-
- ! EXTERN struct file_data files[2];
-
- /* Queue up one-line messages to be printed at the end,
- when -l is specified. Each message is recorded with a `struct msg'. */
- ***************
- *** 352,358 ****
- --- 371,381 ----
- #endif
- VOID *xmalloc ();
- VOID *xrealloc ();
- + #ifdef __STDC__
- + char *concat (char *, char *, char *);
- + #else
- char *concat ();
- + #endif
- void free ();
- char *rindex ();
- char *index ();
- *** /GNU/version.c Thu Jan 06 16:31:00 1983
- --- version.c Fri Apr 13 07:31:00 1984
- ***************
- *** 1,3 ****
- /* Version number of GNU diff. */
-
- ! char *version_string = "1.15";
- --- 1,3 ----
- /* Version number of GNU diff. */
-
- ! char *version_string = "1.15 - Amiga release 920413";
- *** /GNU/util.c Fri Apr 13 07:09:00 1984
- --- util.c Fri Apr 13 07:30:00 1984
- ***************
- *** 129,136 ****
- strcat (name, " ");
- strcat (name, name1);
-
- ! if (paginate_flag)
- ! {
- int pipes[2];
- int desc;
-
- --- 129,136 ----
- strcat (name, " ");
- strcat (name, name1);
-
- ! if (paginate_flag) {
- ! #ifndef AMIGA
- int pipes[2];
- int desc;
-
- ***************
- *** 162,167 ****
- --- 162,172 ----
- close (pipes[0]);
- outfile = fdopen (pipes[1], "w");
- }
- + #else
- + print_message_queue();
- + fprintf(stderr,"This option is unavailable on Amiga\n");
- + exit(2);
- + #endif /* not AMIGA */
- }
- else
- {
- ***************
- *** 188,194 ****
- --- 193,201 ----
- if (outfile != stdout)
- {
- fclose (outfile);
- + #ifndef AMIGA
- wait (0);
- + #endif
- }
- }
-
- Files /GNU/regex.c and regex.c are identical
- Files /GNU/normal.c and normal.c are identical
- Files /GNU/io.c and io.c are identical
- Files /GNU/ifdef.c and ifdef.c are identical
- Files /GNU/getopt1.c and getopt1.c are identical
- Files /GNU/getopt.c and getopt.c are identical
- Files /GNU/ed.c and ed.c are identical
- *** /GNU/dir.c Fri Apr 13 07:08:00 1984
- --- dir.c Mon Apr 09 08:33:00 1984
- ***************
- *** 17,22 ****
- --- 17,28 ----
- along with GNU DIFF; see the file COPYING. If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
- + #include <exec/types.h>
- + #include <exec/memory.h>
- + #include <libraries/dos.h>
- + #include <proto/dos.h>
- + #include <proto/exec.h>
- + #include "regex.h"
- #include "diff.h"
-
- static int compare_names ();
- ***************
- *** 36,43 ****
- char *dirname;
- int nonex;
- {
- ! register DIR *reading;
- ! register struct direct *next;
- struct dirdata dirdata;
-
- /* Address of block containing the files that are described. */
- --- 42,49 ----
- char *dirname;
- int nonex;
- {
- ! BPTR dlock;
- ! struct FileInfoBlock *pFIB;
- struct dirdata dirdata;
-
- /* Address of block containing the files that are described. */
- ***************
- *** 57,64 ****
- }
-
- /* Open the directory and check for errors. */
- ! reading = opendir (dirname);
- ! if (!reading)
- {
- perror_with_name (dirname);
- dirdata.length = -1;
- --- 63,70 ----
- }
-
- /* Open the directory and check for errors. */
- ! dlock = Lock(dirname, ACCESS_READ);
- ! if (!dlock)
- {
- perror_with_name (dirname);
- dirdata.length = -1;
- ***************
- *** 65,70 ****
- --- 71,84 ----
- return dirdata;
- }
-
- + pFIB = (struct FileInfoBlock *) AllocMem(sizeof(struct FileInfoBlock),
- + MEMF_CLEAR);
- + if (!pFIB) {
- + UnLock(dlock);
- + dirdata.length = -1;
- + return dirdata;
- + }
- +
- /* Initialize the table of filenames. */
-
- nfiles = 100;
- ***************
- *** 74,98 ****
- /* Read the directory entries, and insert the subfiles
- into the `files' table. */
-
- ! while (next = readdir (reading))
- ! {
- ! /* Ignore the files `.' and `..' */
- ! if (next->d_name[0] == '.'
- ! && (next->d_name[1] == 0
- ! || (next->d_name[1] == '.'
- ! && next->d_name[2] == 0)))
- continue;
- !
- ! if (files_index == nfiles)
- ! {
- nfiles *= 2;
- ! files
- ! = (char **) xrealloc (files, sizeof (char *) * nfiles);
- }
- ! files[files_index++] = concat (next->d_name, "", "");
- }
-
- ! closedir (reading);
-
- /* Sort the table. */
- qsort (files, files_index, sizeof (char *), compare_names);
- --- 88,108 ----
- /* Read the directory entries, and insert the subfiles
- into the `files' table. */
-
- ! if (Examine(dlock, pFIB)) {
- ! while (ExNext(dlock, pFIB)) {
- ! if (pFIB->fib_FileName[0] == '.' && pFIB->fib_FileName[1] == '\0' ||
- ! pFIB->fib_FileName[1] == '.' && pFIB->fib_FileName[2] == '\0')
- continue;
- ! if (files_index == nfiles) {
- nfiles *= 2;
- ! files = (char **) xrealloc (files, sizeof (char *) * nfiles);
- }
- ! files[files_index++] = concat(pFIB->fib_FileName, "", "");
- ! }
- }
-
- ! FreeMem(pFIB, sizeof(struct FileInfoBlock));
- ! UnLock(dlock);
-
- /* Sort the table. */
- qsort (files, files_index, sizeof (char *), compare_names);
- Files /GNU/diff3.c and diff3.c are identical
- *** /GNU/diff.c Fri Apr 13 07:08:00 1984
- --- diff.c Fri Apr 13 07:49:00 1984
- ***************
- *** 24,29 ****
- --- 24,36 ----
- #include "regex.h"
- #include "diff.h"
- #include "getopt.h"
- + #ifdef AMIGA
- + char *fixupname(char *);
- +
- + /* Patch for the Amiga: 0's in stats are OK for stdin */
- + int fstat(int fd, struct stat *ps);
- + int fstat(int fd, struct stat *ps) { return 0; }
- + #endif
-
-
- /* Nonzero for -r: if comparing two directories,
- ***************
- *** 446,451 ****
- --- 453,461 ----
- int val;
- int errorcount = 0;
- int stat_result[2];
- + #ifdef AMIGA
- + char *tmp_name;
- + #endif
-
- /* If this is directory comparison, perhaps we have a file
- that exists only in one of the directories.
- ***************
- *** 473,480 ****
- if (name1 == 0)
- name1 = name0;
-
- ! inf[0].name = dir0 == 0 ? name0 : concat (dir0, "/", name0);
- ! inf[1].name = dir1 == 0 ? name1 : concat (dir1, "/", name1);
-
- /* Stat the files. Record whether they are directories.
- Record in stat_result whether stat fails. */
- --- 483,517 ----
- if (name1 == 0)
- name1 = name0;
-
- ! #ifdef AMIGA
- ! if (dir0 == 0L) inf[0].name = name0;
- ! else {
- ! if (*dir0 == '\0') inf[0].name = strdup(name0);
- ! else {
- ! tmp_name = concat(dir0, "/", name0);
- ! inf[0].name = fixupname(tmp_name);
- ! free(tmp_name);
- ! };
- ! };
- ! /* fprintf(stderr,"494: fixupname=%s\n",inf[0].name); */
- ! #else
- ! inf[0].name = (dir0 == 0 ? name0 : concat (dir0, "/", name0));
- ! #endif
- ! #ifdef AMIGA
- ! if (dir1 == 0L) inf[1].name = name1;
- ! else {
- ! if (*dir1 == '\0') inf[1].name = strdup(name1);
- ! else {
- ! tmp_name = concat(dir1, "/", name1);
- ! inf[1].name = fixupname(tmp_name);
- ! free(tmp_name);
- ! };
- ! };
- ! /* fprintf(stderr,"509: fixupname=%s\n",inf[1].name); */
- ! fflush(stderr);
- ! #else
- ! inf[1].name = ((dir1 == 0) ? name1 : concat (dir1, "/", name1));
- ! #endif
-
- /* Stat the files. Record whether they are directories.
- Record in stat_result whether stat fails. */
- ***************
- *** 588,596 ****
- int dir_arg = (inf[0].dir_p ? 0 : 1);
- int fnm_arg = (inf[0].dir_p ? 1 : 0);
- char *p = rindex (inf[fnm_arg].name, '/');
- char *filename = concat (inf[dir_arg].name, "/",
- (p ? p+1 : inf[fnm_arg].name));
- !
- if (inf[fnm_arg].name == Standard_Input)
- fatal ("can't compare - to a directory");
-
- --- 625,643 ----
- int dir_arg = (inf[0].dir_p ? 0 : 1);
- int fnm_arg = (inf[0].dir_p ? 1 : 0);
- char *p = rindex (inf[fnm_arg].name, '/');
- + #ifdef AMIGA
- + char *filename;
- + if (strcmp(inf[dir_arg].name,"") == 0)
- + filename = strdup((p ? p+1 : inf[fnm_arg].name));
- + else {
- + filename = concat (inf[dir_arg].name, "/", (p ? p+1 : inf[fnm_arg].name));
- + filename = fixupname(filename);
- + };
- + /* fprintf(stderr,"633: fixupname=%s\n",filename); */
- + #else
- char *filename = concat (inf[dir_arg].name, "/",
- (p ? p+1 : inf[fnm_arg].name));
- ! #endif
- if (inf[fnm_arg].name == Standard_Input)
- fatal ("can't compare - to a directory");
-
- ***************
- *** 605,616 ****
- {
- /* JF: patch from the net to check and make sure we can really free
- this. If it's from argv[], freeing it is a *really* bad idea */
- if (0 != (dir_arg ? dir1 : dir0))
- free (inf[dir_arg].name);
- inf[dir_arg].name = filename;
- if (fstat (inf[dir_arg].desc, &inf[dir_arg].stat) < 0)
- pfatal_with_name (inf[dir_arg].name);
- !
- inf[dir_arg].dir_p
- = (S_IFDIR == (inf[dir_arg].stat.st_mode & S_IFMT));
- if (inf[dir_arg].dir_p)
- --- 652,669 ----
- {
- /* JF: patch from the net to check and make sure we can really free
- this. If it's from argv[], freeing it is a *really* bad idea */
- + #ifndef AMIGA
- if (0 != (dir_arg ? dir1 : dir0))
- free (inf[dir_arg].name);
- + #endif
- inf[dir_arg].name = filename;
- + #ifdef AMIGA
- + if (stat (inf[dir_arg].name, &inf[dir_arg].stat) < 0)
- + pfatal_with_name (inf[dir_arg].name);
- + #else
- if (fstat (inf[dir_arg].desc, &inf[dir_arg].stat) < 0)
- pfatal_with_name (inf[dir_arg].name);
- ! #endif
- inf[dir_arg].dir_p
- = (S_IFDIR == (inf[dir_arg].stat.st_mode & S_IFMT));
- if (inf[dir_arg].dir_p)
- Files /GNU/context.c and context.c are identical
- Files /GNU/analyze.c and analyze.c are identical
- Files /GNU/alloca.c and alloca.c are identical
-